import request from '@/utils/request'

// 首页统计相关
// 获取账号监控待处理数
export function monitorTaskErr(query) {
  return request({
    url: '/merchant/statistics/monitorTaskErr',
    method: 'get',
    params: query
  })
}
// 获取滞销商品数
export function getKucunNum(query) {
  return request({
    url: '/merchant/statistics/unsoldDaysCount',
    method: 'get',
    params: query
  })
}
// 订单总数统计
export function saleOrderNum(query) {
  return request({
    url: '/merchant/statistics/saleOrderNum',
    method: 'get',
    params: query
  })
}

// 近七日订单统计
export function saleOrderlast7Days(query) {
  return request({
    url: '/merchant/statistics/saleOrder/last7Days',
    method: 'get',
    params: query
  })
}

// 销售人订单统计
export function orderNumbySale(query) {
  return request({
    url: '/merchant/statistics/saleOrder/bySale',
    method: 'get',
    params: query
  })
}

// 按游戏统计销售额
export function payAndProfitsByGame(query) {
  return request({
    url: '/merchant/statistics/saleOrder/payAndProfits',
    method: 'get',
    params: query
  })
}

// 商品数量统计   总量
export function goodsStatebyGame(query) {
  return request({
    url: '/merchant/statistics/goodsState/byGame',
    method: 'get',
    params: query
  })
}

// 用户注册统计
export function registerlast7Days(query) {
  return request({
    url: '/merchant/statistics/register/last7Days',
    method: 'get',
    params: query
  })
}

// 商家商品数量统计
export function goodsCountByTenant(query) {
  return request({
    url: '/admin/index/goodsCount',
    method: 'get',
    params: query
  })
}

// 商家虞豆统计
export function yudouCountByTenant(query) {
  return request({
    url: '/admin/index/yudouCount',
    method: 'get',
    params: query
  })
}

// 商家注册用户统计
export function getSupplerUserTotal(query) {
  return request({
    url: '/admin/index/userCount',
    method: 'get',
    params: query
  })
}
// 商家排行榜 /merchant/statistics/paihang
export function getPaihang(query) {
  return request({
    url: '/merchant/statistics/paihang',
    method: 'get',
    params: query
  })
}

// 获取模块虞豆消费统计 
export function getModuleYudou(query) {
  return request({
    url: '/admin/index/yudouType',
    method: 'get',
    params: query
  })
}

// 商家代办事项数量 
export function getdaibanshixiang(query) {
  return request({
    url: '/merchant/statistics/daibanshixiang',
    method: 'get',
    params: query,
    timeout:1000*60
  })
}

// 在售商品数量 
export function getZaishoushangpin(query) {
  return request({
    url: '/merchant/statistics/shangpin',
    method: 'get',
    params: query
  })
}
// 获取我卖的订单统计 
export function getwomaide1(query) {
  return request({
    url: '/merchant/statistics/womaide1',
    method: 'get',
    params: query
  })
}
// 获取我买的订单统计  
export function getwomaide2(query) {
  return request({
    url: '/merchant/statistics/womaide2',
    method: 'get',
    params: query
  })
}
// 商家互联统计  
export function gethuliantongji(query) {
  return request({
    url: '/merchant/statistics/huliantongji',
    method: 'get',
    params: query
  })
}

// 获取自定义店铺数据项
export function getuserDataList(query) {
  return request({
    url: '/userData/list',
    method: 'get',
    params: query
  })
}

// 更新自定义店铺数据项
export function getuserDataUpdateList(data) {
  return request({
    url: '/userData/updateList1',
    method: 'post',
    data
  })
}
// 更新自定义我的应用数据
export function getuserDataUpdateList2(data) {
  return request({
    url: '/userData/updateList2',
    method: 'post',
    data
  })
}

// 查询自定义店铺数据的统计结果
export function getgetUserDate(params) {
  return request({
    url: '/merchant/statistics/getUserDate',
    method: 'get',
    params,
    timeout:1000*60
  })
}

// 查询APP推广运营数据 
export function getAppTuiguangShuju(params) {
  return request({
    url: '/yxtj/byYxType',
    method: 'get',
    params,
    timeout:1000*60
  })
}

// APP推广注册统计 报表
export function getAppTuiguangBaobiao(params) {
  return request({
    url: '/yxtj/list',
    method: 'get',
    params,
    timeout:1000*60
  })
}

// 服务类型
export function getServiceCount() {
  return request({
    url: '/admin/index/serviceCount',
    method: 'get',

  })
}

//分销排行榜
export function rankSale() {
  return request({
    url: '/merchant/v2/rank/sale',
    method: 'get',

  })
}

//供货排行榜
export function rankSupply() {
  return request({
    url: '/merchant/v2/rank/supply',
    method: 'get',

  })
}

//互提订单数据
export function v2Mutual() {
  return request({
    url: '/merchant/v2/mutual',
    method: 'get',

  })
}

//优质商家列表
export function getMerchants() {
  return request({
    url: '/merchant/v2/quality/merchants',
    method: 'get',

  })
}
